home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
online
/
source
/
c
/
compilers
/
Bob 1.5.sit.hqx
/
Bob 1.5
/
Bob.doc
< prev
next >
Wrap
Text File
|
1993-10-02
|
3KB
|
121 lines
Bob was written by:
David Betz
P.O. Box 144
Peterborough, NH 03458
(603) 924-4145
Bob is available free of charge for non-commercial use. If you're
interested in using Bob commercially, please contact me at the above
address.
Bob Syntax:
Class definition:
class <class-name> [ : <base-class-name> ]
{ <member-definition>... }
Member definition:
<variable-name>... ;
static <variable-name>... ;
<function-name> ( [ <formal-argument-list> ] ) ;
static <function-name> ( [ <formal-argument-list> ] ) ;
Function definition:
[ <class-name> :: ] <function-name>
( [ <formal-argument-list> [ ; <temporary-list> ] )
{ <statement>... }
Statement:
if ( <test-expression> ) <then-statement> [ else <else-statement> ] ;
while ( <test-expression> ) <body-statement>
do <body-statement> while ( <test-expression> ) ;
for ( <init-expression> ; <test-expression> ; <increment-expression> )
<body-statement>
break ;
continue ;
return [ <result-expression> ] ;
[ <expression> ] ;
{ <statement>... }
;
Expression:
<expression> , <expression>
<lvalue> = <expression>
<lvalue> += <expression>
<lvalue> -= <expression>
<lvalue> *= <expression>
<lvalue> /= <expression>
<lvalue> %= <expression>
<lvalue> &= <expression>
<lvalue> |= <expression>
<lvalue> ^= <expression>
<lvalue> <<= <expression>
<lvalue> >>= <expression>
<test-expression> ? <true-expression> : <false-expression>
<expression> || <expresssion>
<expression> && <expression>
<expression> | <expression>
<expression> ^ <expression>
<expression> & <expression>
<expression> == <expression>
<expression> != <expression>
<expression> < <expression>
<expression> <= <expression>
<expression> >= <expression>
<expression> > <expression>
<expression> << <expression>
<expression> >> <expression>
<expression> + <expression>
<expression> - <expression>
<expression> * <expression>
<expression> / <expression>
<expression> % <expression>
- <expression>
! <expression>
~ <expression>
++ <lvalue>
-- <lvalue>
<lvalue> ++
<lvalue> --
new <class-name> ( [ <constructor-arguments> ] )
<expression> ( [ <arguments> ] )
<expression> -> <function-name> ( [ <arguments> ] )
<expression> '[' <expression ']'
( <expression> )
<variable-name>
<number>
<string>
nil
Lvalue:
<variable-name>
<vector-or-string-expression> '[' <expression> ']'
Global Variables:
stdin The standard input file pointer
stdout The standard output file pointer
stderr The standard error file pointer
Runtime Routines:
typeof(x) Returns the type of its argument
gc() Invoke the garbage collector
newvector(s) Returns a new vector of the specified size
newstring(s) Returns a new string of the specified size
sizeof(x) Returns the size of a vector or string
fopen(name,mode) Opens a file (returns a file pointer)
fclose(fp) Closes a file
getc(fp) Gets a character from an open file
putc(ch,fp) Writes a character to an open file
print(x) Prints an object to stdout
getarg(n) Gets argv[n]
system(cmd) Executes a shell command